package com.example.myapplication.net.bean.request

import com.example.myapplication.extensions.json
/**
 * 基础请求包
 */
class BaseRequest<T> {

    var loginType = "app"
    var token : String ?= null
    var userId : Int ?= null
    var projectId : Int ?= null
    var data : T ?= null

    constructor()

    constructor(baseRequest: BaseRequest<*>){
        this.token = baseRequest.token
        this.userId = baseRequest.userId
        this.projectId = baseRequest.projectId
    }

    override fun toString(): String {
        return json().writeValueAsString(this)
    }

}